<% remote_form_for :counter,@counter ,
      :url => '/counters/update',
      :update => 'result' do |f| %>

  <div id="result">&nbsp;</div>
  <%= f.error_messages %>
  <p>
    <%= f.label :id %><br />
    <%= f.text_field :id %>
  </p>

  <p>
    <%= f.label :code %><br />
    <%= f.text_field :code %>
  </p>
  <p>
    <%= f.label :so %><br />
    <%= f.text_field :so %>
  </p>
  <p>
    <%= f.submit '更新', :class=>"ui-button ui-state-default ui-corner-all" %>
    <input type="button"  class="jqmClose ui-button ui-state-default ui-corner-all" value="关闭" />
  </p>
<% end %>

  